1. Field of the Invention
The present invention relates to a three-dimensional measurement system which projects a pattern image on an object to be measured, and captures the pattern image to acquire distance information.
2. Description of the Related Art
The three-dimensional measurement technique is a technical element in the field of industrial machine vision. A method for performing three-dimensional measurement using machine vision will be described below. A measurement target object is irradiated with two-dimensional pattern light, and the obtained pattern projection image is captured by a camera. The captured image is then analyzed by a computer based on periodicity of the two-dimensional pattern, and distance information of the measurement target object is obtained. The distance information is a distance between the measurement target object and the camera, or the distance in a depth direction, such as surface unevenness. Since the information on a width direction and a height direction can be obtained from a two-dimensional captured image, three-dimensional space information can thus be obtained. Three-dimensional model fitting is then performed using the two-dimensional captured image, the distance information, and previously-stored model information of the measurement target object. A position, an orientation, and a three-dimensional shape of the measurement target object are thus measured.
For example, the three-dimensional measurement technique is used in robot arms for picking parts and performing assembly in manufacturing lines of plants. The position, the orientation, and the three-dimensional shape of the parts are measured using the three-dimensional measurement technique. The robot arm is then controlled based on the obtained information, so that the robot arm can efficiently and accurately pick the parts and perform assembly.
The three-dimensional measurement method employing the two-dimensional pattern, which includes a spatial coding method and a phase shift method, can double as image recognition processing to be an effective method. Further, a projector can causes the patterns change to project the patterns, so that pattern projection by the projector is effective in the three-dimensional measurement method such as the spatial coding method and the phase shift method which requires a plurality of patterns.
The projector is capable of switching the patterns at a frame rate of 30 to 60 fps or greater to project the patterns. The camera is similarly capable of capturing the images at a high frame rate, and resolutions of the projector and the camera have also improved. As a result, if measurement is performed with the pattern changing for each frame, three-dimensional measurement can be performed with high accuracy and speed.
Japanese Patent No. 4391137 discusses a measurement apparatus for measuring a three-dimensional curved surface shape, including a pattern projection unit capable of projecting an arbitrary pattern on a surface of a object to be measured. Further, the measurement apparatus includes an image capturing unit for capturing, while shifting one or more slits projected on the surface of the object to be measured in a direction perpendicular to the slit, one or more types of patterns including at least a pattern that is projected a plurality of times from a direction other than a direction of projection. Furthermore, the measurement apparatus includes a shape calculation unit for performing image processing on the captured pattern projection image and calculating a three-dimensional curved surface shape of the object to be measured.
Moreover, Japanese Patent Application Laid-Open No. 2003-532062 discusses a digitizer having functions for performing stereoscopic vision of the target object, three-dimensional (3D) digitization of color, and motion capturing. The digitizer includes a base that supports two projection mechanisms configured with two cameras and projectors. One of the projection mechanisms includes a diffraction grating element for projecting an encoded pattern on the surface of the target object, and is used for performing active sensing of a 3D range. The other projection mechanism is used for obtaining texture information of the target object. The camera and the optical projector are arranged at an angle with each other to have optical axes that converge through one point. Further, a computer operates the projector according to a selected function, and processes a video signal generated by the camera.
However, the above-described conventional techniques have the following problems. Referring to FIG. 10, the three-dimensional measurement system basically includes a camera 203, a projector 202, and a personal computer (PC) 201. A synchronization control apparatus 204 is further added between the PC 201 and the projector 202, and synchronizes pattern projection performed by the projector 202 and image capturing performed by the camera 203. Further, in the three-dimensional measurement system, the PC 201 and the synchronization control apparatus 204 are connected via a video output interface (I/F) 205, and the synchronization control apparatus 204 and the projector 202 are connected via a video output I/F 206. In such a system, the PC 201 can only output video data to the synchronization control apparatus 204 or the projector 202.
To solve such a problem, a command from the PC 201 is transmitted by superimposing the command on the video data, and the synchronization control apparatus 204 extracts the superimposed command. The PC 201 thus becomes capable of transmitting the command to the synchronization control apparatus 204.
However, when the video output I/F is employed, the video data is transmitted in only one direction from the PC 201 to the synchronization control apparatus 204. The synchronization control apparatus 204 thus cannot return a status to the PC 201.
If a dedicated transmission unit for returning the status from the synchronization control apparatus 204 to the PC 201 is then to be realized, it becomes necessary to add other I/F to both the PC 201 and the synchronization control apparatus 204 (refer to dotted-line arrow illustrated in FIG. 10). In such a case, the system size increases, and it also becomes necessary to newly develop and implement communication software for the I/F, causing an increase in operation man-hours and cost.
However, if there is no dedicated transmission unit for returning the status from the synchronization control apparatus 204 to the PC 201, there is no means for informing the PC 201, for example, when the status is error information. The system may thus perform measurement in an error state. Further, the system may become aware of the error after analyzing the captured image, so that there is a great delay in responding to the error.
Japanese Patent No. 4391137 connects the PC to the camera and the projector, and performs projection and image capturing by synchronizing timings of the projector and the camera. However, since there is no synchronization control device and the PC internally adjusts the timing, it is difficult to increase the processing speed. Further, Japanese Patent No. 4391137 does not discuss transmitting to the PC the statuses of the projection and image capturing processes.
Furthermore, Japanese Patent Application Laid-Open No. 2003-532062 discusses as an external I/F of the apparatus, control signals for setting operations of the camera and the projector, and a video signal from the camera. However, since the projector only includes a lamp, there is no video input signal. Further, there are no signals to be output with respect to the statuses of the camera and the projector.